import { createRouter, createWebHashHistory } from 'vue-router'
import test from '../views/test.vue'
import Register from '../views/Register.vue'
import Login from '../views/Login.vue'
import Home from '../views/Home.vue'
import updatevalues from '../views/updatevalues.vue'
import addGoods from '../views/addGoods.vue'
import userInit from '../views/userInit.vue'
import userShop from '../views/userShop.vue'
import addGoodsArr from '../views/addGoodsArr.vue'




const routes = [
  {
    path: '/',
    name: 'home',
    component: Home
  },
  {
    path: '/login',
    name: 'Login',
    component: Login,
  },
  {
    path: '/register',
    name: 'Register',
    component: Register,
  },
  {
    path: '/userInit',
    name: 'userInit',
    component: userInit,
  },
  {
    path: '/updatevalues',
    name: 'updatevalues',
    component: updatevalues,
  },
  {
    path: '/addGoods',
    name: 'addGoods',
    component: addGoods,
  },
  {
    path: '/userShop',
    name:'userShop',
    component:userShop
  },
  {
    path:'/test',
    name:test,
    component:test
  },
  {
    path:'/addGoodsArr',
    name:addGoodsArr,
    component:addGoodsArr
  }
]

const router = createRouter({
  history: createWebHashHistory(process.env.BASE_URL),
  routes
})

export default router
